package String;

import java.util.Scanner;

public class string_reverse {
    public static void main(String[] args) {
        //键盘录入一个字符串，调用该方法后，控制台输出结果，例如，输入：abc，输出：cba
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String result = reverse(s);
        System.out.println(result);
    }
    public static String reverse(String str){
        String result="";
        for(int i=str.length()-1;i>=0;i--){
            char ch=str.charAt(i);
            result=result+ch;
        }
        return result;
    }
}
